package com20230214.xiti;

import java.util.Arrays;
import java.util.Random;

public class Demo01 {

    public static void main(String[] args) {
        int[] arr = new int[5];
        Random rand = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = rand.nextInt(46) + 5;
            System.out.print(arr[i] + " ");
        }
        System.out.println();
        int[] s = getNewArr(arr);
        System.out.println(Arrays.toString(s));
    }




        static int[] getNewArr(int[] arr1) {
            for (int i = 0; i < arr1.length; i++) {
                if (arr1[i] < 10) {
                    arr1[i] = 0;
                }
            }
            return arr1;

        }

}
